package com.ming.seatMonitoring.controller;

import com.ming.seatMonitoring.mapper.PhotoMapper;
import com.ming.seatMonitoring.pojo.entity.ResultBody;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 小明
 * @date 2021/10/24
 * @description
 */
@RestController
public class PhotoController {
    @Autowired
    private PhotoMapper photoMapper;

    @RequestMapping("getPhoto")
    public ResultBody getPhoto(@RequestParam int roomId){
        return ResultBody.ok().data("pic",photoMapper.getPhoto(roomId));
    }
}
